<template>
  <div>
    <el-tree
      :data="titleData"
      :props="defaultProps"
      @node-click="handleNodeClick"
    />
  </div>
</template>

<script>
export default {
  name: 'LeftMain',
  props:['titleData','handleNode'],
  data() {
    return {
      defaultProps: {
        children: 'children',
        label: 'label'
      }
    }
  },
  methods: {
    // 点击树形结构标题
    handleNodeClick(data) {
      this.handleNode(data)
    }
  }
}
</script>

<style scoped>

</style>
